package com.cy.pj.sys.service;

import com.cy.pj.common.pojo.PageObject;
import com.cy.pj.sys.pojo.SysRole;
import com.cy.pj.sys.pojo.SysUser;
import com.cy.pj.sys.pojo.SysUserDept;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @author 张琪
 * @date 2020/11/17
 * @describe
 */
public interface SysUserService {
    PageObject findPageObjects(String username, Integer pageCurrent);

    int validById(Integer id, Integer valid);

    PageObject findPageObjects1(String name, Integer pageCurrent);

    int saveObject(SysUser sysUser, Integer[] roleIds);

    Map<String, Object> doFindById(Integer id);

    int updateObject(SysUser sysUser, Integer[] roleIds);

    /**
     *
     * @param password  原密码
     * @param newPassword  新密码
     * @param cfgPassword  确认密码
     * @return  修改行数
     */
    int updatePassword(String password, String newPassword, String cfgPassword);
}
